package com.多线程基础.三种实现方式.Runnable接口实现;

public class ThreadDemo {
    public static void main(String[] args) {
        MyRun mr=new MyRun();//任务对象

        Thread t1=new Thread(mr);//任务对象给了thread
        Thread t2=new Thread(mr);
        t1.setName("线程1");
        t2.setName("线程2");
        t1.start();
        t2.start();
    }
}
